package com.ruoyi.project.system.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.project.system.mapper.SysDynamicPariseMapper;
import com.ruoyi.project.system.domain.SysDynamicParise;
import com.ruoyi.project.system.service.ISysDynamicPariseService;

/**
 * 动态点赞Service业务层处理
 * 
 * @author jjp
 * @date 2020-07-15
 */
@Service
public class SysDynamicPariseServiceImpl implements ISysDynamicPariseService 
{
    @Autowired
    private SysDynamicPariseMapper sysDynamicPariseMapper;

    /**
     * 查询动态点赞
     * 
     * @param pariseId 动态点赞ID
     * @return 动态点赞
     */
    @Override
    public SysDynamicParise selectSysDynamicPariseById(Long pariseId)
    {
        return sysDynamicPariseMapper.selectSysDynamicPariseById(pariseId);
    }

    /**
     * 查询动态点赞列表
     * 
     * @param sysDynamicParise 动态点赞
     * @return 动态点赞
     */
    @Override
    public List<SysDynamicParise> selectSysDynamicPariseList(SysDynamicParise sysDynamicParise)
    {
        return sysDynamicPariseMapper.selectSysDynamicPariseList(sysDynamicParise);
    }

    /**
     * 新增动态点赞
     * 
     * @param sysDynamicParise 动态点赞
     * @return 结果
     */
    @Override
    public int insertSysDynamicParise(SysDynamicParise sysDynamicParise)
    {
        sysDynamicParise.setCreateTime(DateUtils.getNowDate());
        return sysDynamicPariseMapper.insertSysDynamicParise(sysDynamicParise);
    }

    /**
     * 修改动态点赞
     * 
     * @param sysDynamicParise 动态点赞
     * @return 结果
     */
    @Override
    public int updateSysDynamicParise(SysDynamicParise sysDynamicParise)
    {
        return sysDynamicPariseMapper.updateSysDynamicParise(sysDynamicParise);
    }

    /**
     * 批量删除动态点赞
     * 
     * @param pariseIds 需要删除的动态点赞ID
     * @return 结果
     */
    @Override
    public int deleteSysDynamicPariseByIds(Long[] pariseIds)
    {
        return sysDynamicPariseMapper.deleteSysDynamicPariseByIds(pariseIds);
    }

    /**
     * 删除动态点赞信息
     * 
     * @param pariseId 动态点赞ID
     * @return 结果
     */
    @Override
    public int deleteSysDynamicPariseById(Long pariseId)
    {
        return sysDynamicPariseMapper.deleteSysDynamicPariseById(pariseId);
    }

    @Override
    public Integer selectCountParise() {
        return sysDynamicPariseMapper.selectCountParise();
    }

    @Override
    public int deleteSysDynamicPariseByDynamic(SysDynamicParise sysDynamicParise) {
        return sysDynamicPariseMapper.deleteSysDynamicPariseByDynamic(sysDynamicParise);
    }
}
